Skip to content

Conversation

@savannahostrowski
Copy link
Member

With https://github.com/fastapi/typer/releases/tag/0.20.0, Typer now provides command suggestions on error, meaning we get this UX for free.

@savannahostrowski savannahostrowski added dependencies Pull requests that update a dependency file internal labels Oct 20, 2025
@savannahostrowski savannahostrowski changed the title ⬆️ Bump typer to 0.20.0 to add command suggestions on typo ⬆️ Bump Typer to 0.20.0 to add command suggestions on typo Oct 20, 2025
Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the suggestions in 0.20.0 are great, but do we have to bump here? I'd personally only bump the lower-bound for compatibility reasons. Here, I assume that any new install will simply get Typer 0.20.0 even if we don't bump, so why do we need to enforce it (genuine question)? I just want to be mindful of those users/use-cases that want to stick to an older version of Typer for some reason...

@savannahostrowski
Copy link
Member Author

savannahostrowski commented Oct 21, 2025

Good question! My rationale here was that fastapi-cli is an end-user CLI, so I don't really see many realistic scenarios where a bump would cause issues. Even if a user had a super locked-down environment where they've pinned a specific version, they'd still need to update something to get the new CLI version anyway.

From a UX perspective, I'd also argue that suggestions on typos are commonplace in modern CLIs, so it'd be nice if we could ensure a consistent UX for all users. It'd be weird to have the CLI only provide suggestions if the user's deps happened to transitively resolve to 0.20.0, right? By bumping the lower bound, we guarantee everyone gets the same base experience.

@svlandeg
Copy link
Member

I see where you're coming from, I'm just unsure whether we need to make that decision for users or not. They might have a pin on Typer in the same env for some other reason. Anyway I don't care strongly either way, just thought it was worth discussing. Will let Tiangolo make the final decision 😉

@tiangolo
Copy link
Member

Thank you!

Commenting here just to reflect the internal discussion. 😅

Let's not bump here, most users will get the upgraded version, but if one of them has an app that has an upper bound pin, if we require this lowerbound, the package manager will just install an older version of fastapi-cli that doesn't have the lower bound pin, so better to keep this for now open, that way they can always get the latest version of fastapi-cli even if they have a lower bound pin for Typer for some other reason.

...at some point, we might end up adding a feature in Typer that we need here and we'll end up having the new lower bound pin anyway, but if we can skip it for now, let's do that. 🤓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants